//
//  MCTableViewCell.m
//  利用model处理数据
//
//  Created by Mr&Clover on 2019/3/11.
//  Copyright © 2019年 MrC. All rights reserved.
//

#import "MCTableViewCell.h"

@interface MCTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
@property (weak, nonatomic) IBOutlet UIButton *mapButton;
@property (weak, nonatomic) IBOutlet UILabel *telLabel;



@end

@implementation MCTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)setModel:(MCModel *)model {
    // 对model进行赋值
    _model = model;
    self.titleLabel.text = model.title;
    self.addressLabel.text = model.address;
    self.telLabel.text = model.telPhone;
}

- (IBAction)clickBtnAction:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(receiveModel:)]) {
        [self.delegate receiveModel:self.model];
    }
}


@end
